package org.edu.modules.oa.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

import org.edu.common.api.vo.Result;
import org.edu.common.aspect.annotation.AutoLog;
import org.edu.modules.oa.entity.VeBaseCampusEntity;
import org.edu.modules.oa.service.IVeBaseCampusService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@Api(tags="查看校区人员")
@RestController
@RequestMapping("oa/campusUser")
@Slf4j
public class VeBaseCampusUserController {

    @Resource//注入
    private IVeBaseCampusService iVeBaseCampusService;
    //日志注解
    @AutoLog(value = "查看校区人员-树状图")
    //(value = “接口说明”, httpMethod = “接口请求方式”, response = “接口返回参数类型”, notes = “接口发布说明”）
    @ApiOperation(value="查看校区人员", notes="查看校区人员-树状图")
    //映射一个POST请求
    @PostMapping(value = "/getUser")
    //展示表格
    public Result<?>getUser(){
        HashMap<String, Object> map =  iVeBaseCampusService.getCampusUserList();
        return Result.OK(map);

    }

    //日志注解
    @AutoLog(value = "查看校区部门-树状图")
    //(value = “接口说明”, httpMethod = “接口请求方式”, response = “接口返回参数类型”, notes = “接口发布说明”）
    @ApiOperation(value="查看校区部门", notes="查看校区部门-树状图")
    //映射一个POST请求
    @PostMapping(value = "/getDep")
    //展示表格
    public Result<?>getDep(){
        HashMap<String, Object> map =  iVeBaseCampusService.getCampusDepList();
        return Result.OK(map);

    }







}
